## API Report File for "@backstage/plugin-kubernetes-common"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { BasicPermission } from '@backstage/plugin-permission-common';
import { Entity } from '@backstage/catalog-model';
import { FetchResponse as FetchResponse_2 } from '@backstage/plugin-kubernetes-common';
import type { JsonObject } from '@backstage/types';
import type { JsonValue } from '@backstage/types';
import { ObjectsByEntityResponse as ObjectsByEntityResponse_2 } from '@backstage/plugin-kubernetes-common';
import { PodStatus } from '@kubernetes/client-node';
import { V1ConfigMap } from '@kubernetes/client-node';
import { V1CronJob } from '@kubernetes/client-node';
import { V1DaemonSet } from '@kubernetes/client-node';
import { V1Deployment } from '@kubernetes/client-node';
import { V1HorizontalPodAutoscaler } from '@kubernetes/client-node';
import { V1Ingress } from '@kubernetes/client-node';
import { V1Job } from '@kubernetes/client-node';
import { V1LimitRange } from '@kubernetes/client-node';
import { V1Pod } from '@kubernetes/client-node';
import { V1ReplicaSet } from '@kubernetes/client-node';
import { V1ResourceQuota } from '@kubernetes/client-node';
import { V1Service } from '@kubernetes/client-node';
import { V1StatefulSet } from '@kubernetes/client-node';

// @public
export const ANNOTATION_KUBERNETES_API_SERVER = 'kubernetes.io/api-server';

// @public
export const ANNOTATION_KUBERNETES_API_SERVER_CA =
  'kubernetes.io/api-server-certificate-authority';

// @public
export const ANNOTATION_KUBERNETES_AUTH_PROVIDER =
  'kubernetes.io/auth-provider';

// @public
export const ANNOTATION_KUBERNETES_AWS_ASSUME_ROLE =
  'kubernetes.io/aws-assume-role';

// @public
export const ANNOTATION_KUBERNETES_AWS_CLUSTER_ID =
  'kubernetes.io/x-k8s-aws-id';

// @public
export const ANNOTATION_KUBERNETES_AWS_EXTERNAL_ID =
  'kubernetes.io/aws-external-id';

// @public
export const ANNOTATION_KUBERNETES_DASHBOARD_APP =
  'kubernetes.io/dashboard-app';

// @public
export const ANNOTATION_KUBERNETES_DASHBOARD_PARAMETERS =
  'kubernetes.io/dashboard-parameters';

// @public
export const ANNOTATION_KUBERNETES_DASHBOARD_URL =
  'kubernetes.io/dashboard-url';

// @public
export const ANNOTATION_KUBERNETES_OIDC_TOKEN_PROVIDER =
  'kubernetes.io/oidc-token-provider';

// @public
export const ANNOTATION_KUBERNETES_SKIP_METRICS_LOOKUP =
  'kubernetes.io/skip-metrics-lookup';

// @public
export const ANNOTATION_KUBERNETES_SKIP_TLS_VERIFY =
  'kubernetes.io/skip-tls-verify';

// @public (undocumented)
export type AuthProviderType = 'google' | 'serviceAccount' | 'aws' | 'azure';

// @public (undocumented)
export interface ClientContainerStatus {
  // (undocumented)
  container: string;
  // (undocumented)
  cpuUsage: ClientCurrentResourceUsage;
  // (undocumented)
  memoryUsage: ClientCurrentResourceUsage;
}

// @public (undocumented)
export interface ClientCurrentResourceUsage {
  // (undocumented)
  currentUsage: number | string;
  // (undocumented)
  limitTotal: number | string;
  // (undocumented)
  requestTotal: number | string;
}

// @public (undocumented)
export interface ClientPodStatus {
  // (undocumented)
  containers: ClientContainerStatus[];
  // (undocumented)
  cpu: ClientCurrentResourceUsage;
  // (undocumented)
  memory: ClientCurrentResourceUsage;
  // (undocumented)
  pod: V1Pod;
}

// @public (undocumented)
export interface ClusterAttributes {
  dashboardApp?: string;
  dashboardParameters?: JsonObject;
  dashboardUrl?: string;
  name: string;
  title?: string;
}

// @public (undocumented)
export interface ClusterObjects {
  // (undocumented)
  cluster: ClusterAttributes;
  // (undocumented)
  errors: KubernetesFetchError[];
  // (undocumented)
  podMetrics: ClientPodStatus[];
  // (undocumented)
  resources: FetchResponse[];
}

// @public (undocumented)
export interface ConfigMapFetchResponse {
  // (undocumented)
  resources: Array<V1ConfigMap>;
  // (undocumented)
  type: 'configmaps';
}

// @public (undocumented)
export interface CronJobsFetchResponse {
  // (undocumented)
  resources: Array<V1CronJob>;
  // (undocumented)
  type: 'cronjobs';
}

// @public (undocumented)
export interface CustomObjectsByEntityRequest {
  // (undocumented)
  auth: KubernetesRequestAuth;
  // (undocumented)
  customResources: CustomResourceMatcher[];
  // (undocumented)
  entity: Entity;
}

// @public (undocumented)
export interface CustomResourceFetchResponse {
  // (undocumented)
  resources: Array<any>;
  // (undocumented)
  type: 'customresources';
}

// @public (undocumented)
export interface CustomResourceMatcher {
  // (undocumented)
  apiVersion: string;
  // (undocumented)
  group: string;
  // (undocumented)
  plural: string;
}

// @public (undocumented)
export interface DaemonSetsFetchResponse {
  // (undocumented)
  resources: Array<V1DaemonSet>;
  // (undocumented)
  type: 'daemonsets';
}

// @public (undocumented)
export interface DeploymentFetchResponse {
  // (undocumented)
  resources: Array<V1Deployment>;
  // (undocumented)
  type: 'deployments';
}

// @public (undocumented)
export interface DeploymentResources {
  // (undocumented)
  deployments: V1Deployment[];
  // (undocumented)
  horizontalPodAutoscalers: V1HorizontalPodAutoscaler[];
  // (undocumented)
  pods: V1Pod[];
  // (undocumented)
  replicaSets: V1ReplicaSet[];
}

// @public
export interface DetectedError {
  // (undocumented)
  message: string;
  // (undocumented)
  occurrenceCount: number;
  // (undocumented)
  proposedFix?: ProposedFix;
  // (undocumented)
  severity: ErrorSeverity;
  // (undocumented)
  sourceRef: ResourceRef;
  // (undocumented)
  type: string;
}

// @public
export type DetectedErrorsByCluster = Map<string, DetectedError[]>;

// @public
export const detectErrors: (
  objects: ObjectsByEntityResponse_2,
) => DetectedErrorsByCluster;

// @public (undocumented)
export interface DocsSolution extends ProposedFixBase {
  // (undocumented)
  docsLink: string;
  // (undocumented)
  type: 'docs';
}

// @public (undocumented)
export interface ErrorMapper<T> {
  // (undocumented)
  detectErrors: (resource: T) => DetectedError[];
}

// @public
export type ErrorSeverity = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;

// @public (undocumented)
export interface EventsSolution extends ProposedFixBase {
  // (undocumented)
  podName: string;
  // (undocumented)
  type: 'events';
}

// @public (undocumented)
export type FetchResponse =
  | PodFetchResponse
  | ServiceFetchResponse
  | ConfigMapFetchResponse
  | DeploymentFetchResponse
  | LimitRangeFetchResponse
  | ResourceQuotaFetchResponse
  | ReplicaSetsFetchResponse
  | HorizontalPodAutoscalersFetchResponse
  | JobsFetchResponse
  | CronJobsFetchResponse
  | IngressesFetchResponse
  | CustomResourceFetchResponse
  | StatefulSetsFetchResponse
  | DaemonSetsFetchResponse
  | PodStatusFetchResponse;

// @public (undocumented)
export interface GroupedResponses extends DeploymentResources {
  // (undocumented)
  configMaps: V1ConfigMap[];
  // (undocumented)
  cronJobs: V1CronJob[];
  // (undocumented)
  customResources: any[];
  // (undocumented)
  daemonSets: V1DaemonSet[];
  // (undocumented)
  ingresses: V1Ingress[];
  // (undocumented)
  jobs: V1Job[];
  // (undocumented)
  services: V1Service[];
  // (undocumented)
  statefulsets: V1StatefulSet[];
}

// @public (undocumented)
export const groupResponses: (
  fetchResponse: FetchResponse_2[],
) => GroupedResponses;

// @public (undocumented)
export interface HorizontalPodAutoscalersFetchResponse {
  // (undocumented)
  resources: Array<V1HorizontalPodAutoscaler>;
  // (undocumented)
  type: 'horizontalpodautoscalers';
}

// @public (undocumented)
export interface IngressesFetchResponse {
  // (undocumented)
  resources: Array<V1Ingress>;
  // (undocumented)
  type: 'ingresses';
}

// @public (undocumented)
export interface JobsFetchResponse {
  // (undocumented)
  resources: Array<V1Job>;
  // (undocumented)
  type: 'jobs';
}

// @public (undocumented)
export type KubernetesErrorTypes =
  | 'BAD_REQUEST'
  | 'UNAUTHORIZED_ERROR'
  | 'NOT_FOUND'
  | 'SYSTEM_ERROR'
  | 'UNKNOWN_ERROR';

// @public (undocumented)
export type KubernetesFetchError = StatusError | RawFetchError;

// @public
export const kubernetesPermissions: BasicPermission[];

// @public
export const kubernetesProxyPermission: BasicPermission;

// @public (undocumented)
export type KubernetesRequestAuth = {
  [providerKey: string]: JsonValue | undefined;
};

// @public (undocumented)
export interface KubernetesRequestBody {
  // (undocumented)
  auth?: KubernetesRequestAuth;
  // (undocumented)
  entity: Entity;
}

// @public (undocumented)
export interface LimitRangeFetchResponse {
  // (undocumented)
  resources: Array<V1LimitRange>;
  // (undocumented)
  type: 'limitranges';
}

// @public (undocumented)
export interface LogSolution extends ProposedFixBase {
  // (undocumented)
  container: string;
  // (undocumented)
  type: 'logs';
}

// @public (undocumented)
export interface ObjectsByEntityResponse {
  // (undocumented)
  items: ClusterObjects[];
}

// @public (undocumented)
export interface PodFetchResponse {
  // (undocumented)
  resources: Array<V1Pod>;
  // (undocumented)
  type: 'pods';
}

// @public (undocumented)
export interface PodStatusFetchResponse {
  // (undocumented)
  resources: Array<PodStatus>;
  // (undocumented)
  type: 'podstatus';
}

// @public (undocumented)
export type ProposedFix = LogSolution | DocsSolution | EventsSolution;

// @public (undocumented)
export interface ProposedFixBase {
  // (undocumented)
  actions: string[];
  // (undocumented)
  errorType: string;
  // (undocumented)
  rootCauseExplanation: string;
}

// @public (undocumented)
export interface RawFetchError {
  // (undocumented)
  errorType: 'FETCH_ERROR';
  // (undocumented)
  message: string;
}

// @public (undocumented)
export interface ReplicaSetsFetchResponse {
  // (undocumented)
  resources: Array<V1ReplicaSet>;
  // (undocumented)
  type: 'replicasets';
}

// @public (undocumented)
export interface ResourceQuotaFetchResponse {
  // (undocumented)
  resources: Array<V1ResourceQuota>;
  // (undocumented)
  type: 'resourcequotas';
}

// @public
export interface ResourceRef {
  // (undocumented)
  apiGroup: string;
  // (undocumented)
  kind: string;
  // (undocumented)
  name: string;
  // (undocumented)
  namespace: string;
}

// @public (undocumented)
export interface ServiceFetchResponse {
  // (undocumented)
  resources: Array<V1Service>;
  // (undocumented)
  type: 'services';
}

// @public (undocumented)
export interface StatefulSetsFetchResponse {
  // (undocumented)
  resources: Array<V1StatefulSet>;
  // (undocumented)
  type: 'statefulsets';
}

// @public (undocumented)
export interface StatusError {
  // (undocumented)
  errorType: KubernetesErrorTypes;
  // (undocumented)
  resourcePath?: string;
  // (undocumented)
  statusCode?: number;
}

// @public (undocumented)
export interface WorkloadsByEntityRequest {
  // (undocumented)
  auth: KubernetesRequestAuth;
  // (undocumented)
  entity: Entity;
}
```
